﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Store">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Books">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Book">
                <xs:complexType>
                  <xs:attribute name="name" type="xs:string" use="required" />
                  <xs:attribute name="pageNumbers" type="xs:unsignedShort" use="required" />
                  <xs:attribute name="price" type="xs:unsignedByte" use="required" />
                  <xs:attribute name="currency" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Foods">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Food">
                <xs:complexType>
                  <xs:attribute name="name" type="xs:string" use="required" />
                  <xs:attribute name="weight" type="xs:unsignedByte" use="required" />
                  <xs:attribute name="price" type="xs:unsignedByte" use="required" />
                  <xs:attribute name="currency" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required" />
      <xs:attribute name="size" type="xs:unsignedByte" use="required" />
      <xs:attribute name="hidden" type="xs:boolean" use="required" />
    </xs:complexType>
  </xs:element>
</xs:schema>